package com.wudizaba.microservicesdemocommon.R.Enum;

public enum ResponseCode {

    SUCCESS(200,"操作成功!"),
    FAILURE(201,"操作失败"),
    /**系统相关的错误码：5开头**/
    ERROR(500,"系统异常，请稍后重试"),
    /**参数相关的错误码：1开头**/
    PARAM_ERROR(1000,"参数异常"),

    /**权限相关的错误码：2开头**/
    INVALID_TOKEN(2001,"访问令牌不合法"),
    ACCESS_DENIED(2002,"没有权限访问该资源"),
    USERNAME_OR_PASSWORD_ERROR(2003,"用户名或密码错误"),

    //登录异常
    LOGIN_ERROR(2004,"登录异常"),

    //mqtt异常
    MQTT_SERVER_ERROR(3005, "mqtt服务器异常"),

    //quartz异常
    QUARTZ_SERVER_ERROR(4006, "quartz服务器异常"),


    //excel异常
    EXCEL_ERROR(5001, "excel导出异常");

    private final int code;

    private final String message;

    ResponseCode(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
